package cn.t.service.user;
import cn.t.core.service.ServiceImpl;
import cn.t.model.user.CustomerInfoDO;
import cn.t.repository.user.CustomerInfoRepository;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 客户信息表领域服务
 * @author l
 */
@Slf4j
@Service
@AllArgsConstructor
public class CustomerInfoService extends ServiceImpl<CustomerInfoDO, CustomerInfoRepository> {

    public void deleteCustomer(Long customerId) {
        repository.deleteCustomer(customerId);
    }


    public void deleteIndividualCustomer(Long individualId) {
        deleteCustomer(individualId);
        customerIndividualService.deleteCustomer(individualId);
    }

    public void disableIndividualCustomer(Long individualId) {
        repository.disableIndividualCustomer(individualId);
    }

    public void enableIndividualCustomer(Long individualId) {
        repository.enableIndividualCustomer(individualId);
    }

    @Autowired
    private CustomerIndividualService customerIndividualService;


}
